Skip to content

Initialize playwright and add some very basic end to end tests#242

Merged
nilsnolde merged 2 commits intovalhalla:masterfrom
mustaphaturhan:issue-58-add-e2e-tests
Sep 15, 2025
Merged

Initialize playwright and add some very basic end to end tests#242
nilsnolde merged 2 commits intovalhalla:masterfrom
mustaphaturhan:issue-58-add-e2e-tests

Conversation

@mustaphaturhan
Copy link
Collaborator

Related #58

🛠️ Fixes Issue

  • Adds playwright github workflow
  • Adds very basic end to end tests to make sure curicial parts of application are working

👨‍💻 Changes proposed

  • We should introduce end to end tests to make sure while contributing the project, we are not breaking anything else. There might be a lot of things to do, like introducing vite, typescript and removing jQuery etc. We should keep the application safe while improving it.

@mustaphaturhan mustaphaturhan self-assigned this Sep 15, 2025
@mustaphaturhan mustaphaturhan added enhancement New feature or request CI/CD involves changes related to CI/CD workflow labels Sep 15, 2025
@chrstnbwnkl
Copy link
Member

Thanks, this has been on the todo list for a long time!

Copy link
Member

@nilsnolde nilsnolde left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot @mustaphaturhan , this is so so valuable! I'm very happy with playwright, super easy to read:)

BTW, feel free to use the upstream remote. Currently the GHA isn't working because the domain gis-ops.com went out of service recently, but I'm currently in the process of re-instating it, so soon we'd have a preview on PRs again when using upstream remote.

run: npx playwright install --with-deps
- name: Run Playwright tests
run: npx playwright test
- uses: actions/upload-artifact@v4
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what's the upload for? I guess it's an HTML coverage report? does it also print that to stdout in the previous step? or is there some other magic, e.g. like coveralls (adds a PR comment with a detailed coverage report, see nilsnolde/valhalla-qgis-plugin#31 (comment)) or codecov (adds check items in the PR and annotates the "Changed files" tab) to get a coverage report?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

playwright generates an html after every run and gives you a chance to preview what happened while running the test. however, I configure it to generate the images and videos only if something went wrong while running the test. this will be very useful when something passed on your local, but failed on CI. more info here.

for features like coveralls or codecov, I believe we can setup something like playwright-report-comment.

@nilsnolde nilsnolde merged commit 0f9d6d3 into valhalla:master Sep 15, 2025
2 of 3 checks passed
@mustaphaturhan mustaphaturhan deleted the issue-58-add-e2e-tests branch September 15, 2025 15:19
@mustaphaturhan mustaphaturhan mentioned this pull request Sep 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI/CD involves changes related to CI/CD workflow enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants